﻿using System;
using UnityEngine;

public class FadeLightIntensity : MonoBehaviour
{
    public float duration = 0.2f;
    public float endValue;
    public float startValue = 1f;
    public Light target;

    private void OnEnable()
    {
        this.StartAnimateFloat(this.startValue, this.endValue, this.duration, (Action<float>) (x => (this.target.intensity = x)), null);
    }
}

